Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mito): Stores and recovers flushed sequence #2355

Merged

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Sep 12, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR fixes the issue that the engine doesn't store and recover the flushed sequence:

  • If we only store the flushed entry in the manifest, we can't recover the committed sequence if there is no data in the WAL
  • It maintains a flushed sequence in the version and recovers it from the manifest
  • It adds a test to check this

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@evenyag evenyag marked this pull request as ready for review September 12, 2023 07:19
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

❗ No coverage uploaded for pull request base (migrate-region-server@7bb6ac3). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head c9f7680 differs from pull request most recent head 7c485bd. Consider uploading reports for the commit 7c485bd to get more accurate results

Additional details and impacted files
@@                   Coverage Diff                    @@
##             migrate-region-server    #2355   +/-   ##
========================================================
  Coverage                         ?   77.41%           
========================================================
  Files                            ?      724           
  Lines                            ?   114924           
  Branches                         ?        0           
========================================================
  Hits                             ?    88974           
  Misses                           ?    25950           
  Partials                         ?        0           

@killme2008 killme2008 added this pull request to the merge queue Sep 12, 2023
Merged via the queue into GreptimeTeam:migrate-region-server with commit 3edb274 Sep 12, 2023
waynexia pushed a commit that referenced this pull request Sep 12, 2023
* test: add test for reopen

* feat: last entry id starts from flushed entry id

* fix: store flushed sequence and recover it from manifest

* test: check sequence in alter test

* test: more tests for alter
waynexia pushed a commit that referenced this pull request Sep 12, 2023
* test: add test for reopen

* feat: last entry id starts from flushed entry id

* fix: store flushed sequence and recover it from manifest

* test: check sequence in alter test

* test: more tests for alter
waynexia pushed a commit that referenced this pull request Sep 12, 2023
* test: add test for reopen

* feat: last entry id starts from flushed entry id

* fix: store flushed sequence and recover it from manifest

* test: check sequence in alter test

* test: more tests for alter
WenyXu pushed a commit to WenyXu/greptimedb that referenced this pull request Sep 13, 2023
* test: add test for reopen

* feat: last entry id starts from flushed entry id

* fix: store flushed sequence and recover it from manifest

* test: check sequence in alter test

* test: more tests for alter
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* test: add test for reopen

* feat: last entry id starts from flushed entry id

* fix: store flushed sequence and recover it from manifest

* test: check sequence in alter test

* test: more tests for alter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants